---------------------------------------------------------------
-- @Copyright：           zour
-- @Description：         微服定义汇总

-- @modify time           2022-04-21
---------------------------------------------------------------
local M = {}

--game_test服涉及到的cache key
M.cache_key = {
   
}



M.maxValue = 65535        --无效值
M.fapaiNum = 13           --初始发牌输量
M.maxPlayer = 2           --最大人数

--牌型
M.cards = {
    --万(1~9)
    11, 12, 13, 14, 15, 16, 17, 18, 19,
    11, 12, 13, 14, 15, 16, 17, 18, 19,
    11, 12, 13, 14, 15, 16, 17, 18, 19,
    11, 12, 13, 14, 15, 16, 17, 18, 19,
    --条(1~9)
    --21, 22, 23, 24, 25, 26, 27, 28, 29,
    --21, 22, 23, 24, 25, 26, 27, 28, 29,
    --21, 22, 23, 24, 25, 26, 27, 28, 29,
    --21, 22, 23, 24, 25, 26, 27, 28, 29,
    --筒(1~9)
    --31, 32, 33, 34, 35, 36, 37, 38, 39,
    --31, 32, 33, 34, 35, 36, 37, 38, 39,
    --31, 32, 33, 34, 35, 36, 37, 38, 39,
    --31, 32, 33, 34, 35, 36, 37, 38, 39,
    --字牌 (风牌：东南西北   箭牌：中发白)
    41, 42, 43, 44, 45, 46, 47,
    41, 42, 43, 44, 45, 46, 47,
    41, 42, 43, 44, 45, 46, 47,
    41, 42, 43, 44, 45, 46, 47,
    --花牌(春夏秋冬梅兰竹菊)
    --51, 52, 53, 54, 55, 56, 57, 58,
    --51, 52, 53, 54, 55, 56, 57, 58,
    --51, 52, 53, 54, 55, 56, 57, 58,
    --51, 52, 53, 54, 55, 56, 57, 58,
}

--听状态
M.tingStatus = {
    nothing = 0,            --无
    waitTing = 1,           --待听
    ting = 2,               --确认听
    showTing = 3,           --显示听按钮状态 
    cancelTing = 4,         --已经取消听 
}

--游戏状态
M.state = {
    gameStart = 1;          --游戏开始
    sendBanker = 2;         --定庄
    sendCards = 3;          --发初始13张牌
    gaming = 4;             --正常游戏中
    finish = 5;             --游戏结束
}

--游戏状态时间
M.stateTime = {
    [M.state.gameStart] = 1,  
    [M.state.sendBanker] = 1,
    [M.state.sendCards] = 2,
    [M.state.gaming] = 60,
    [M.state.finish] = 2,
}

--东南西北方位
M.pos = {
    east = 1,               --东
    south = 2,              --南
    west = 3,               --西
    north = 4,              --北
}

--操作类型
M.operType = {
    nothing = 0,            --无状态
    check = 1,              --过
    outCard = 2,            --打
    chi = 3,                --吃
    peng = 4,               --碰
    mingGang = 5,           --明杠
    anGang = 6,             --暗杠
    buGang = 7,             --补杠
    zimo = 8,               --自摸胡
    dianPao = 9,            --点炮胡
    ting = 10,              --听
}

M.retMessage = {
    error = -1,             --失败
    ok = 0,                 --成功
    wait = 1,               --等待其他人操作
}

--操作时间
M.operStateTime = {
    [M.operType.outCard] = 0,
    [M.operType.outCard] = 10,
    [M.operType.chi] = 10,
    [M.operType.peng] = 10,
    [M.operType.mingGang] = 10,
    [M.operType.anGang] = 10,
    [M.operType.buGang] = 10,
    [M.operType.ting] = 1,
}

--番型
M.fanXing = {
    daSiXi = 1,             --大四喜
    daSanYuan = 2,          --大三元
    jiuBao = 3,             --九宝莲灯
    siGang = 4,             --四杠
    lian7dui = 5,           --连7对
    tianHe = 6,             --天和
    diHe = 7,               --地和
    renHe = 8,              --人和
    baiWanShi = 9,          --百万石

    xiaoSiXi = 10,          --小四喜
    xiaoSanYuan = 11,       --小三元
    ziYiSe = 12,            --字一色
    siAnKe = 13,            --四暗刻
    yiSeShuangLong = 14,    --一色双龙会

    yiSeSiTongShun = 15,    --一色四同顺
    yiSeSiJieGao = 16,      --一色四节高

    yiSeSiBuGao = 17,       --一色四步高
    sanGang = 18,           --三杠
    hunJiuYao = 19,         --混九幺

    qiDui = 20,             --七对
    qingYiSe = 21,          --清一色
    yiSeSanTongShun = 22,   --一色三同顺
    yiSeSanJieGao = 23,     --一色三节高

    qingLong = 24,          --清龙
    yiSeSanBuGao = 25,      --一色三步高
    sanAnKe = 26,           --三暗刻
    tianTing = 27,          --天听

    dayu5 = 28,             --大于5
    xiaoyu5 = 29,           --小于5
    sanFengKe = 30,         --三风刻

    miaoshou = 31,          --妙手回春
    haidi = 32,             --海底捞月
    gangHua = 33,           --杠上开花

    pengpengHe = 34,        --碰碰和
    hunYiSe = 35,           --混一色
    quanQiuRen = 36,        --全求人
    shuangAnGang = 37,      --双暗杠
    shuangJianKe = 38,      --双箭刻

    quanDaiYao = 39,        --全带幺
    buQiuRen = 40,          --不求人
    shuangMingGang = 41,    --双明杠
    heJueZhang = 42,        --和绝张
    liZhi = 43,             --立直

    jianKe = 44,            --箭刻
    quanFengKe = 45,        --圈风刻
    menFengKe = 46,         --门风刻
    menqiangQing = 47,      --门前清
    pingHe = 48,            --平和
    siGui = 49,             --四归
    shuangAnKe = 50,        --双暗刻
    anGang = 51,            --暗杠
    duanYao = 52,           --断幺

    ewbj = 53,              --二五八将
    yaoJiuTou = 54,         --幺九头
    baoTing = 55,           --报听
    yiBanGao = 56,          --一般高
    lianLiu = 57,           --连六
    laoshaoFu = 58,         --老少副
    yaoJiuKe = 59,          --幺九刻
    mingGang = 60,          --明杠
    bianZhang = 61,         --边张
    kanZhang = 62,          --坎张
    danDiaoJiang = 63,      --单调将
    ziMo = 64,              --自摸
    huaPai = 65,            --花牌
}

--番型倍数
M.fanXingValue = {
    [M.fanXing.daSiXi] = 88,             --大四喜
    [M.fanXing.daSanYuan] = 88,          --大三元
    [M.fanXing.jiuBao] = 88,             --九宝莲灯
    [M.fanXing.siGang] = 88,             --四杠
    [M.fanXing.lian7dui] = 88,           --连7对
    [M.fanXing.tianHe] = 88,             --天和
    [M.fanXing.diHe] = 88,               --地和
    [M.fanXing.renHe] = 88,              --人和
    [M.fanXing.baiWanShi] = 88,          --百万石

    [M.fanXing.xiaoSiXi] = 64,          --小四喜
    [M.fanXing.xiaoSanYuan] = 64,       --小三元
    [M.fanXing.ziYiSe] = 64,            --字一色
    [M.fanXing.siAnKe] = 64,            --四暗刻
    [M.fanXing.yiSeShuangLong] = 64,    --一色双龙会

    [M.fanXing.yiSeSiTongShun] = 48,    --一色四同顺
    [M.fanXing.yiSeSiJieGao] = 48,      --一色四节高

    [M.fanXing.yiSeSiBuGao] = 32,       --一色四步高
    [M.fanXing.sanGang] = 32,           --三杠
    [M.fanXing.hunJiuYao] = 32,         --混九幺

    [M.fanXing.qiDui] = 24,             --七对
    [M.fanXing.qingYiSe] = 24,          --清一色
    [M.fanXing.yiSeSanTongShun] = 24,   --一色三同顺
    [M.fanXing.yiSeSanJieGao] = 24,     --一色三节高

    [M.fanXing.qingLong] = 16,          --清龙
    [M.fanXing.yiSeSanBuGao] = 16,      --一色三步高
    [M.fanXing.sanAnKe] = 16,           --三暗刻
    [M.fanXing.tianTing] = 16,          --天听

    [M.fanXing.dayu5] = 12,             --大于5
    [M.fanXing.xiaoyu5] = 12,           --小于5
    [M.fanXing.sanFengKe] = 12,         --三风刻

    [M.fanXing.miaoshou] = 8,          --妙手回春
    [M.fanXing.haidi] = 8,             --海底捞月
    [M.fanXing.gangHua] = 8,           --杠上开花

    [M.fanXing.pengpengHe] = 6,        --碰碰和
    [M.fanXing.hunYiSe] = 6,           --混一色
    [M.fanXing.quanQiuRen] = 6,        --全求人
    [M.fanXing.shuangAnGang] = 6,      --双暗杠
    [M.fanXing.shuangJianKe] = 6,      --双箭刻

    [M.fanXing.quanDaiYao] = 4,        --全带幺
    [M.fanXing.buQiuRen] = 4,          --不求人
    [M.fanXing.shuangMingGang] = 4,    --双明杠
    [M.fanXing.heJueZhang] = 4,        --和绝张
    [M.fanXing.liZhi] = 4,             --立直

    [M.fanXing.jianKe] = 2,            --箭刻
    [M.fanXing.quanFengKe] = 2,        --圈风刻
    [M.fanXing.menFengKe] = 2,         --门风刻
    [M.fanXing.menqiangQing] = 2,      --门前清
    [M.fanXing.pingHe] = 2,            --平和
    [M.fanXing.siGui] = 2,             --四归
    [M.fanXing.shuangAnKe] = 2,        --双暗刻
    [M.fanXing.anGang] = 2,            --暗杠
    [M.fanXing.duanYao] = 2,           --断幺

    [M.fanXing.ewbj] = 1,              --二五八将
    [M.fanXing.yaoJiuTou] = 1,         --幺九头
    [M.fanXing.baoTing] = 1,           --报听
    [M.fanXing.yiBanGao] = 1,          --一般高
    [M.fanXing.lianLiu] = 1,           --连六
    [M.fanXing.laoshaoFu] = 1,         --老少副
    [M.fanXing.yaoJiuKe] = 1,          --幺九刻
    [M.fanXing.mingGang] = 1,          --明杠
    [M.fanXing.bianZhang] = 1,         --边张
    [M.fanXing.kanZhang] = 1,          --坎张
    [M.fanXing.danDiaoJiang] = 1,      --单调将
    [M.fanXing.ziMo] = 1,              --自摸
    [M.fanXing.huaPai] = 1,            --花牌
}

--冲突番型表
---[[
M.ClashFan = {
    [M.fanXing.daSiXi] = {M.fanXing.sanFengKe, M.fanXing.pengpengHe, M.fanXing.yaoJiuKe},
    [M.fanXing.daSanYuan] = {M.fanXing.jianKe, M.fanXing.shuangJianKe},
    [M.fanXing.jiuBao] = {M.fanXing.qingYiSe, M.fanXing.buQiuRen, M.fanXing.menqiangQing, M.fanXing.yaoJiuKe},
    [M.fanXing.siGang] = {M.fanXing.shuangAnGang, M.fanXing.shuangMingGang, M.fanXing.mingGang, M.fanXing.anGang, M.fanXing.danDiaoJiang },
    [M.fanXing.lian7dui] = {M.fanXing.qingYiSe, M.fanXing.buQiuRen, M.fanXing.danDiaoJiang, M.fanXing.menqiangQing, M.fanXing.qiDui, M.fanXing.lianLiu, M.fanXing.yiBanGao},           
    [M.fanXing.tianHe] = {M.fanXing.danDiaoJiang, M.fanXing.bianZhang, M.fanXing.kanZhang},            
    [M.fanXing.diHe] = {},               
    [M.fanXing.renHe] = {},              
    [M.fanXing.baiWanShi] = {M.fanXing.qingYiSe},          

    [M.fanXing.xiaoSiXi] = {M.fanXing.sanFengKe, M.fanXing.yaoJiuKe},          
    [M.fanXing.xiaoSanYuan] = {M.fanXing.jianKe, M.fanXing.shuangJianKe, M.fanXing.yaoJiuKe},       
    [M.fanXing.ziYiSe] = {M.fanXing.pengpengHe, M.fanXing.hunJiuYao, M.fanXing.quanDaiYao, M.fanXing.yaoJiuKe},            
    [M.fanXing.siAnKe] = {M.fanXing.menqiangQing, M.fanXing.pengpengHe, M.fanXing.sanAnKe, M.fanXing.shuangAnKe, M.fanXing.buQiuRen},            
    [M.fanXing.yiSeShuangLong] = {M.fanXing.pingHe, M.fanXing.qiDui, M.fanXing.qingYiSe, M.fanXing.yiBanGao, M.fanXing.laoshaoFu},    

    [M.fanXing.yiSeSiTongShun] = {M.fanXing.yiSeSanJieGao, M.fanXing.yiBanGao, M.fanXing.siGui, M.fanXing.yiSeSanTongShun},    
    [M.fanXing.yiSeSiJieGao] = {M.fanXing.yiSeSanTongShun, M.fanXing.yiSeSanJieGao, M.fanXing.pengpengHe},      

    [M.fanXing.yiSeSiBuGao] = {M.fanXing.yiSeSanBuGao, M.fanXing.laoshaoFu, M.fanXing.lianLiu},       
    [M.fanXing.sanGang] = {M.fanXing.shuangMingGang, M.fanXing.shuangAnGang, M.fanXing.mingGang, M.fanXing.anGang},           
    [M.fanXing.hunJiuYao] = {M.fanXing.pengpengHe, M.fanXing.yaoJiuKe, M.fanXing.quanDaiYao},         

    [M.fanXing.qiDui] = {M.fanXing.menqiangQing, M.fanXing.buQiuRen, M.fanXing.danDiaoJiang},             
    [M.fanXing.qingYiSe] = {},          
    [M.fanXing.yiSeSanTongShun] = {M.fanXing.yiSeSanJieGao, M.fanXing.yiBanGao},   
    [M.fanXing.yiSeSanJieGao] = {M.fanXing.yiSeSanTongShun},     

    [M.fanXing.qingLong] = {M.fanXing.lianLiu, M.fanXing.laoshaoFu},          
    [M.fanXing.yiSeSanBuGao] = {},      
    [M.fanXing.sanAnKe] = {M.fanXing.shuangAnKe},           
    [M.fanXing.tianTing] = {M.fanXing.liZhi, M.fanXing.baoTing},          

    [M.fanXing.dayu5] = {},             
    [M.fanXing.xiaoyu5] = {},           
    [M.fanXing.sanFengKe] = {M.fanXing.yaoJiuKe},         

    [M.fanXing.miaoshou] = {M.fanXing.ziMo},          
    [M.fanXing.haidi] = {},             
    [M.fanXing.gangHua] = {M.fanXing.ziMo},           

    [M.fanXing.pengpengHe] = {},       
    [M.fanXing.hunYiSe] = {},           
    [M.fanXing.quanQiuRen] = {M.fanXing.danDiaoJiang},        
    [M.fanXing.shuangAnGang] = {M.fanXing.shuangAnKe, M.fanXing.anGang},      
    [M.fanXing.shuangJianKe] = {M.fanXing.jianKe},      

    [M.fanXing.quanDaiYao] = {},        
    [M.fanXing.buQiuRen] = {M.fanXing.menqiangQing, M.fanXing.ziMo},          
    [M.fanXing.shuangMingGang] = {M.fanXing.mingGang},    
    [M.fanXing.heJueZhang] = {},        
    [M.fanXing.liZhi] = {M.fanXing.baoTing, M.fanXing.menqiangQing},             

    [M.fanXing.jianKe] = {M.fanXing.yaoJiuKe},            
    [M.fanXing.quanFengKe] = {M.fanXing.yaoJiuKe},        
    [M.fanXing.menFengKe] = {M.fanXing.yaoJiuKe},         
    [M.fanXing.menqiangQing] = {},      
    [M.fanXing.pingHe] = {},            
    [M.fanXing.siGui] = {},             
    [M.fanXing.shuangAnKe] = {},        
    [M.fanXing.anGang] = {},            
    [M.fanXing.duanYao] = {},           

    [M.fanXing.ewbj] = {},              
    [M.fanXing.yaoJiuTou] = {},         
    [M.fanXing.baoTing] = {},           
    [M.fanXing.yiBanGao] = {},          
    [M.fanXing.lianLiu] = {},           
    [M.fanXing.laoshaoFu] = {},         
    [M.fanXing.yaoJiuKe] = {},          
    [M.fanXing.mingGang] = {},          
    [M.fanXing.bianZhang] = {},         
    [M.fanXing.kanZhang] = {},          
    [M.fanXing.danDiaoJiang] = {},      
    [M.fanXing.ziMo] = {},              
    [M.fanXing.huaPai] = {},            
}
--]]

--
M.operName = {
    [M.operType.check] = "过",
    [M.operType.outCard] = "打",
    [M.operType.chi] = "吃",
    [M.operType.peng] = "碰",
    [M.operType.mingGang] = "明杠",
    [M.operType.anGang] = "暗杠",
    [M.operType.buGang] = "补杠",
    [M.operType.zimo] = "自摸",
    [M.operType.dianPao] = "点炮胡",
    [M.operType.ting] = "听",
}


--番型名字
M.fanXingName = {
    [M.fanXing.daSiXi] = "大四喜",             --大四喜
    [M.fanXing.daSanYuan] = "大三元",          --大三元
    [M.fanXing.jiuBao] = "九宝莲灯",             --九宝莲灯
    [M.fanXing.siGang] = "四杠",             --四杠
    [M.fanXing.lian7dui] = "连7对",           --连7对
    [M.fanXing.tianHe] = "天和",             --天和
    [M.fanXing.diHe] = "地和",               --地和
    [M.fanXing.renHe] = "人和",              --人和
    [M.fanXing.baiWanShi] = "百万石",          --百万石

    [M.fanXing.xiaoSiXi] = "小四喜",          --小四喜
    [M.fanXing.xiaoSanYuan] = "小三元",       --小三元
    [M.fanXing.ziYiSe] = "字一色",            --字一色
    [M.fanXing.siAnKe] = "四暗刻",            --四暗刻
    [M.fanXing.yiSeShuangLong] = "一色双龙会",    --一色双龙会

    [M.fanXing.yiSeSiTongShun] = "一色四同顺",    --一色四同顺
    [M.fanXing.yiSeSiJieGao] = "一色四节高",      --一色四节高

    [M.fanXing.yiSeSiBuGao] = "一色四步高",       --一色四步高
    [M.fanXing.sanGang] = "三杠",           --三杠
    [M.fanXing.hunJiuYao] = "混九幺",         --混九幺

    [M.fanXing.qiDui] = "七对",             --七对
    [M.fanXing.qingYiSe] = "清一色",          --清一色
    [M.fanXing.yiSeSanTongShun] = "一色三同顺",   --一色三同顺
    [M.fanXing.yiSeSanJieGao] = "一色三节高",     --一色三节高

    [M.fanXing.qingLong] = "清龙",          --清龙
    [M.fanXing.yiSeSanBuGao] = "一色三步高",      --一色三步高
    [M.fanXing.sanAnKe] = "三暗刻",           --三暗刻
    [M.fanXing.tianTing] = "天听",          --天听

    [M.fanXing.dayu5] = "大于5",             --大于5
    [M.fanXing.xiaoyu5] = "小于5",           --小于5
    [M.fanXing.sanFengKe] = "三风刻",         --三风刻

    [M.fanXing.miaoshou] = "妙手回春",          --妙手回春
    [M.fanXing.haidi] = "海底捞月",             --海底捞月
    [M.fanXing.gangHua] = "杠上开花",           --杠上开花

    [M.fanXing.pengpengHe] = "碰碰和",        --碰碰和
    [M.fanXing.hunYiSe] = "混一色",           --混一色
    [M.fanXing.quanQiuRen] = "全求人",        --全求人
    [M.fanXing.shuangAnGang] = "双暗杠",      --双暗杠
    [M.fanXing.shuangJianKe] = "双箭刻",      --双箭刻

    [M.fanXing.quanDaiYao] = "全带幺",        --全带幺
    [M.fanXing.buQiuRen] = "不求人",          --不求人
    [M.fanXing.shuangMingGang] = "双明杠",    --双明杠
    [M.fanXing.heJueZhang] = "和绝张",        --和绝张
    [M.fanXing.liZhi] = "立直",             --立直

    [M.fanXing.jianKe] = "箭刻",            --箭刻
    [M.fanXing.quanFengKe] = "圈风刻",        --圈风刻
    [M.fanXing.menFengKe] = "门风刻",         --门风刻
    [M.fanXing.menqiangQing] = "门前清",      --门前清
    [M.fanXing.pingHe] = "平和",            --平和
    [M.fanXing.siGui] = "四归",             --四归
    [M.fanXing.shuangAnKe] = "双暗刻",        --双暗刻
    [M.fanXing.anGang] = "暗杠",            --暗杠
    [M.fanXing.duanYao] = "断幺",           --断幺

    [M.fanXing.ewbj] = "二五八将",              --二五八将
    [M.fanXing.yaoJiuTou] = "幺九头",         --幺九头
    [M.fanXing.baoTing] = "报听",           --报听
    [M.fanXing.yiBanGao] = "一般高",          --一般高
    [M.fanXing.lianLiu] = "连六",           --连六
    [M.fanXing.laoshaoFu] = "老少副",         --老少副
    [M.fanXing.yaoJiuKe] = "幺九刻",          --幺九刻
    [M.fanXing.mingGang] = "明杠",          --明杠
    [M.fanXing.bianZhang] = "边张",         --边张
    [M.fanXing.kanZhang] = "坎张",          --坎张
    [M.fanXing.danDiaoJiang] = "单调将",      --单调将
    [M.fanXing.ziMo] = "自摸",              --自摸
    [M.fanXing.huaPai] = "花牌",            --花牌
}

--牌中文
M.cardName = {
    [11] = "1万", [12] = "2万", [13] = "3万", [14] = "4万", [15] = "5万",
    [16] = "6万", [17] = "7万", [18] = "8万", [19] = "9万",
    [41] = "东风", [42] = "南风", [43] = "西风", [44] = "北风", [45] = "红中",
    [46] = "发财", [47] = "白板",
    [51] = "春", [52] = "夏", [53] = "秋", [54] = "冬", [55] = "梅",
    [56] = "兰", [57] = "竹", [58] = "菊", 
}

return M